A problem was recognized in the Macintosh II's handling of NuBus 
cards in the summer/fall of 1987.  Simply stated, the problem was 
the Slot Manager ran in 24 bit mode when it needed to be running 
in 32 bit mode. This caused the Slot Manager to ignore cards which 
needed more than 1 megabyte of address space.

The problem was fixed via a patch to the Macintosh II ROMs and was
rolled into production around December, 1987.  An upgrade to the new
ROMs is available at no charge from any authorized Apple Dealer.  
All Macintosh IIs manufactured since then, have the fix (and the 
declaration ROM described below) installed.

If a developer's product cannot function with the older ROMs, it is 
important to inform the customers in a consistent manner that will 
avoid confusion about the problem (and/or unnecessary trips to their 
dealers) 

The supplied library (and example program which shows how to use it)
allows detection of the older ROMs, and puts up an alert if the old 
ROMs are detected.  Developers can use this library (it consists of 
one routine) and call it with a small application.  The application 
would ship with their products so customers can check their ROM 
revision.  Customers would run the program on their machine, and would 
be told via an alert to get an upgrade if required.  All the developer 
would need to do then, would be to ship the program  to the customer 
along with the board, have him/her run the application and the application 
would let him/her know if an update is required.  Again, the update is 
ONLY needed if the board uses more than the 1M of slot space.

Important note:  the wording in the alert was decided on by Apple, and 
is desired and requested by Apple.  Please use the library as-is if you 
write your own application, so that the alert wording does not get 
changed, and so that only that alert shows up.  Apple will supply 
international versions of the alert if desired (contact DTS).



Here is a background discussion of the problem:

There are two 32 bit address spaces in the Macintosh II - the CPU 
side, and the NuBus side.  The upper 256 megabytes of the CPU address 
space (F0000000 - FFFFFFFF) maps to the same range in the NuBus 
address space.  This range is divided into 16 chunks of 16 megabytes 
each, with the bottom 15 chunks each being allocated to one slot 
(Fs000000 - FsFFFFFF, where s is a slot number between 0-E).  The 
topmost chunk is unused. All the card's functions accessible from the 
CPU live in its 16 megabyte chunk of address space.

By convention, a card's declaration ROM is situated at the very top of 
its 16 megabyte chunk.  For a 4K declaration ROM (on a card that uses 
all 4 NuBus byte lanes, for purposes of discussion), the ROM would be 
found at FsFFF000 - FsFFFFFF.  This convention allows the slot manager 
to find the declaration ROM for any card.

This assumes that the Macintosh uses full 32-bit addressing.  However, 
much of the Macintosh architecture is built around 24-bit addressing, 
so the hardware has a "24 bit mode" to be compatible with the existing 
architecture.  When the Macintosh II is in 24 bit mode, address 
mappings happen so that a 1 megabyte piece of all the slotsŐ chunks 
can be visible to the CPU.  Specifically, 24 bit addresses from the 
CPU in the range xxsXXXXX get mapped over to NuBus addresses Fs0XXXXX.  
This allows software running in 24 bit mode to access the lowest 1 
megabyte piece of the 16 megabyte chunk for each card.  This mapping 
also implies that the declaration ROM will not be visible in 24 bit 
mode.

The Problem

The problem is that, when running in 24 bit mode, the Slot Manager 
will not recognize cards which need more than 1 megabyte of address 
space, given that the designers place their declaration ROMs according 
to convention.

Why would any cards work when the slot manager runs in 24 bit mode?  
If card designers put their declaration ROMs at the top of the 16 
megabyte NuBus address chunk (from FsFFFFFF downwards), the ROMs 
would not be visible in 24 bit mode (since all 24 bit mode accesses 
get mapped to NuBus addresses Fs0XXXXX).  The Slot Manager, running 
in 24 bit mode, would only see addresses Fs000000 - Fs0FFFFF.  It 
therefore would not be able to see the declaration ROM, and would 
assume the slot was empty.  However, designers who only need 
1 megabyte of address space can ignore bits 20-23 of the address. 
This has the effect of aliasing all 16  1 megabyte pieces over each 
other.  The declaration ROM is therefore visible in the Fs0XXXXX 
range, which is the range accessed by the CPU in 24 bit mode.

The Solution

A change to the Macintosh II ROM will be made to have the Slot Manager 
run in 32 bit mode.  This change will be built into new Macintosh IIs 
as soon as possible (about mid November), so all cards will be 
correctly recognized and initialized during the boot process.   
Dealers will automatically install the new ROMs whenever a Macintosh 
II is taken in for service or upgrades.

It is important to note that only the ROM image will be patched with 
an object code overlay (without rebuilding the ROM), meaning no other 
section of the ROM will be affected or changed in ANY way.   Since 
there was some unused space at the top of the Macintosh II ROM, a 
declaration ROM was added; again, this doesn't change or affect the 
ROM's contents in any way.
